/**
 * Created by jinhongglin on 15-11-26.
 */
app.controller("set_meal_controller",function($scope,$location){
    $scope.set_meal_to_help_order = function(name,price){
        localStorage.setItem("meal_name",name)
        localStorage.setItem("meal_price",price)
        $location.path("/help_order_meal");
    }
    choose_meal($scope)

})


function choose_meal($scope){
    if(localStorage.getItem("restaurant_name") == "KFC"){
        $scope.meal_information = [{meal_name:'田园脆鸡堡',meal_price:"￥10.00"},
            {meal_name:'黄金咖喱猪排饭',meal_price:"￥23.50"} ,
            {meal_name:'意式肉酱肉丸饭',meal_price:"￥16.00"}]
        $scope.secode_meal_information =
            [{second_meal_name :"老北京鸡肉卷", second_meal_price:"￥14.00"},
                {second_meal_name:"劲脆鸡腿堡",second_meal_price:"￥15.00"}]

    }
    if(localStorage.getItem("restaurant_name") == "7-11")
    {
        $scope.meal_information = [{meal_name:'茄子盖饭',meal_price:"￥9.00"},
            {meal_name:'腐竹盖饭',meal_price:"￥13.50"} ,
            {meal_name:'铁锅焖面',meal_price:"￥15.00"}]
        $scope.secode_meal_information =
            [{second_meal_name :"2-11套餐", second_meal_price:"￥20.00"},
                {second_meal_name:"2-13套餐",second_meal_price:"￥19.00"}]

    }
    if(localStorage.getItem("restaurant_name") == "成都小吃")
    {
        $scope.meal_information = [{meal_name:'陈麻婆豆腐',meal_price:"￥8.00"},
            {meal_name:'夫妻肺片',meal_price:"￥15.50"} ,
            {meal_name:'二姐兔丁',meal_price:"￥19.00"}]
        $scope.secode_meal_information =
            [{second_meal_name :"龙抄手", second_meal_price:"￥10.00"},
                {second_meal_name:"荔枝巷钟水饺",second_meal_price:"￥22.00"}]

    }


}


